package com.iplatform.commons.exception.handler;

/**
 * 全局异常
 * 全局捕获的父类异常
 * 其他自定义异常应该继承这个异常
 *
 * @author Dair
 * @since 2020/12/3
 */
public class GlobalException extends RuntimeException {
	
	/**
	 * 异常码
	 */
	private int returnCode;
	
	/**
	 * 异常内容
	 */
	private String returnMessage;
	
	public GlobalException(String message) {
		super(message);
	}
	
	public GlobalException(int returnCode, String returnMessage) {
		this.returnCode = returnCode;
		this.returnMessage = returnMessage;
	}
	
	public GlobalException(String message, Throwable cause) {
		super(message, cause);
	}
	
	public int getReturnCode() {
		return returnCode;
	}
	
	public void setReturnCode(int returnCode) {
		this.returnCode = returnCode;
	}
	
	public String getReturnMessage() {
		return returnMessage;
	}
	
	public void setReturnMessage(String returnMessage) {
		this.returnMessage = returnMessage;
	}
}
